//
//  PPScaleDefine.h
//  PPBlueToothDemo
//
//  Created by 彭思远 on 2020/7/31.
//  Copyright © 2020 彭思远. All rights reserved.
//

#ifndef PPScaleDefine_h
#define PPScaleDefine_h

// 用户性别
typedef NS_ENUM(NSUInteger, PPUserGender) {
    
    PPUserGenderFemale, // 女性
    PPUserGenderMale,   // 男性
};

// 用户使用的单位
typedef NS_ENUM(NSUInteger, PPUserUnit) {
    
    PPUnitKG = 0,
    PPUnitLB = 1,
    PPUnitST = 2,
    PPUnitJin = 3,
    PPUnitSTLB = 4,
    PPUnitG = 5,
    PPUnitLBOZ = 6,
    PPUnitOZ = 7,
    PPUnitMLWater = 8,
    PPUnitMLMilk = 9,
    PPUnitFLOZWater = 10,
    PPUnitFLOZMilk = 11,
};

// 设备类型
typedef NS_ENUM(NSUInteger, PPDeviceType) {
    
    PPDeviceTypeUnknow = 0, // 未知
    PPDeviceTypeCF, // 体脂秤
    PPDeviceTypeCE, //体重秤
    PPDeviceTypeCB, // 婴儿秤
    PPDeviceTypeCA, // 厨房秤
    PPDeviceTypeCC, // 蓝牙WIFI秤
};

// 设备蓝牙协议版本
typedef NS_ENUM(NSUInteger, PPDeviceProtocolType) {
    
    PPDeviceProtocolTypeUnknow = 0, // 未知
    PPDeviceProtocolTypeV2, // 2.x版本
    PPDeviceProtocolTypeV3, // 3.x版本
    PPDeviceProtocolTypeTorre, // torre版本
};

// 测脂计算方式
typedef NS_ENUM(NSUInteger, PPDeviceCalcuteType){
    
    PPDeviceCalcuteTypeUnknow = 0, // 未知
    PPDeviceCalcuteTypeInScale, // 秤端计算
    PPDeviceCalcuteTypeDirect, // 直流算法
    PPDeviceCalcuteTypeAlternate, // 交流算法
    PPDeviceCalcuteTypeNeedNot, // 无需计算
};

// 设备精度
typedef NS_ENUM(NSUInteger, PPDeviceAccuracyType) {
    
    PPDeviceAccuracyTypeUnknow = 0, // 未知
    PPDeviceAccuracyTypePoint01, // 0.1KG精度
    PPDeviceAccuracyTypePoint005, // 0.05KG精度
    PPDeviceAccuracyTypePointG, // 1G精度
    PPDeviceAccuracyTypePoint01G, // 0.1G精度


};

// 设备供电方式
typedef NS_ENUM(NSUInteger, PPDevicePowerType) {
    
    PPDevicePowerTypeUnknow = 0, // 未知
    PPDevicePowerTypeBattery, // 电池
    PPDevicePowerTypeSolar, // 太阳能
    PPDevicePowerTypeCharge, // 充电
};

// 设备功能类型
typedef NS_ENUM(NSUInteger, PPDeviceFuncType) {
    
    PPDeviceFuncTypeWeight = 1 << 0, // 称重
    PPDeviceFuncTypeFat = 1 << 1, // 测脂
    PPDeviceFuncTypeHeartRate = 1 << 2, // 心律
    PPDeviceFuncTypeHistory = 1 << 3, // 历史
    PPDeviceFuncTypeSafe = 1 << 4, // 孕妇
    PPDeviceFuncTypeBMDJ = 1 << 5, // 闭目单脚
};

// 设备具有的单位
typedef NS_ENUM(NSUInteger, PPDeviceUnitType) {
    
    PPDeviceUnitTypeKG = 1 << 0,
    PPDeviceUnitTypeLB = 1 << 1,
    PPDeviceUnitTypeST = 1 << 2,
    PPDeviceUnitTypeJin = 1 << 3,
    PPDeviceUnitTypeSTLB = 1 << 4,
};

// 身体类型
typedef NS_ENUM(NSUInteger, PPBodyDetailType) {
    
     PPBodyTypeThin,             // 偏瘦型
     PPBodyTypeLThinMuscle,      // 偏瘦肌肉型
     PPBodyTypeMuscular,         // 肌肉发达型
    
     PPBodyTypeLackofexercise,   // 缺乏运动型
     PPBodyTypeStandard,         // 标准型
     PPBodyTypeStandardMuscle,   // 标准肌肉型
    
     PPBodyTypeObesFat,          // 浮肿肥胖型
     PPBodyTypeLFatMuscle,       // 偏胖肌肉型
     PPBodyTypeMuscleFat,        // 肌肉型偏胖
};

// 蓝牙开关状态
typedef NS_ENUM(NSUInteger, PPBleSwitchState) {
    
    PPBleSwitchStateOn,
    PPBleSwitchStateOff,
};

// 蓝牙工作状态
typedef NS_ENUM(NSUInteger, PPBleWorkState) {
    
    PPBleWorkStateSearching, //扫描中
    PPBleWorkStateSearchStop, //停止扫描
    PPBleWorkStateConnecting, //设备连接中
    PPBleWorkStateConnected, //设备已连接
    PPBleWorkStateDisconnected, //设备已断开
    PPBleWorkStateCouldReciveData, //可以接收指令
    PPBleWorkStateCouldStartOTA, //可以OTA
    PPBleWoreStateDeviceInfoGetOver, //设备信息已获取

};

// 配网错误状态状态
typedef NS_ENUM(NSUInteger, PPWIFIConfigState) {
    
    PPWIFIConfigStateUnknow,
    PPWIFIConfigStateStart,
    PPWIFIConfigStateStartSuccess,
    PPWIFIConfigStateStartFailed,
    PPWIFIConfigStateDomainSendStart,
    PPWIFIConfigStateDomainSendSuccess,
    PPWIFIConfigStateDomainSendFailed,
    PPWIFIConfigStateDomainSendCode,
    PPWIFIConfigStateDomainSendCodeSuccess,
    PPWIFIConfigStateDomainSendCodeFailed,
    PPWIFIConfigStateSSIDSendStart,
    PPWIFIConfigStateSSIDSendSuccess,
    PPWIFIConfigStateSSIDSendFailed,
    PPWIFIConfigStateSSIDSendCode,
    PPWIFIConfigStateSSIDSendCodeSuccess,
    PPWIFIConfigStateSSIDSendCodeFailed,
    PPWIFIConfigStatePasswordSendStart,
    PPWIFIConfigStatePasswordSendSuccess,
    PPWIFIConfigStatePasswordSendFailed,
    PPWIFIConfigStatePasswordSendCode,
    PPWIFIConfigStatePasswordSendCodeSuccess,
    PPWIFIConfigStatePasswordSendCodeFailed,
    PPWIFIConfigStateRegist,
    PPWIFIConfigStateRegistSuccess,
    PPWIFIConfigStateRegistFailedTimeOut,
    PPWIFIConfigStateRegistFailedConnect,
    PPWIFIConfigStateRegistFailedHTTP,
    PPWIFIConfigStateRegistFailedHTTPS,
    PPWIFIConfigStateRegistFailedRegist,
    PPWIFIConfigStateRegistFailedCommand,
    
};

#define kBLEAdvDataManufacturerData @"kCBAdvDataManufacturerData"
#define kBLEAdvDataLocalName @"kCBAdvDataLocalName"
#define kBLEAdvDataIsConnectable @"kCBAdvDataIsConnectable"

#define kBLEDeviceEnergyScale @"Energy Scale"
#define kBLEDeviceHealthScale @"Health Scale"
#define kBLEDeviceHealthScale3 @"Health Scale3"
#define kBLEDeviceHealthScale5 @"Health Scale5"
#define kBLEDeviceHealthScale6 @"Health Scale6"
#define kBLEDeviceHealthScale7 @"Health Scale7"
#define kBLEDeviceADore @"ADORE"
#define kBLEDeviceADore1 @"ADORE1"
#define kBLEDeviceADore1_D @"ADORE1-D"
#define kBLEDeviceLFScale @"LFScale"
#define kBLEDeviceFLScale @"FLScale"
#define kBLEDeviceFWScale @"FWScale"
#define kBLEDeviceWFScale @"WFScale"
#define kBLEDeviceBFScale @"BFScale"
#define kBLEDeviceElectronicScale @"Electronic Scale"
#define kBLEDeviceBMScale @"BM Scale"
#define kBLEDeviceBodyFatScale @"BodyFat Scale"
#define KBLEDeviceHumanScale @"Human Scale"
#define kBLEDeviceHeartRateScale @"HeartRate Scale"
#define kBLEDeviceHeartRateScale1 @"HeartRate Scale1"
#define KBLEDeviceWeightScale @"Weight Scale"
#define KBLEDeviceWeightScale1 @"Weight Scale1"
#define KBLEDeviceWeightScale2 @"Weight Scale2"
#define KBLEDeviceBodyFatScale1 @"BodyFat Scale1"
#define KBLEDeviceBodyFatScale1_D @"BodyFat Scale1-D"
#define KBLEDeviceLFSC @"LF_SC"
#define KBLEDeviceFDScale @"FDScale"
#define KBLEDeviceLFSmartScale @"LFSmart Scale"
#define KBLEDeviceLFAdv @"LFAdv"
#define KBLEDeviceCF561 @"CF561"
#define KBLEDeviceCF556 @"CF556"
#define KBLEDeviceCF568 @"CF568"
#define KBLEDeviceCF568FuTuLa @"FUTULA"

#define kBLEDeviceKitchenScale @"Kitchen Scale"
#define kBLEDeviceKFScale @"KFScale"
#define KBLEDeviceLFSc @"LFSc"
#define KBLEDevice260H @"260H"

#define KBLEDeviceLEFUSCALECF376 @"LEFU_SCALE CF376"


#define KBLEDeviceLEFUWOLOKITCHEN @"WOLO-KITCHEN"

#endif /* PPScaleDefine_h */
